package net.mikoo.seals.agent.model;

import java.util.Date;
import java.util.Map;

import net.mikoo.seals.agent.common.BaseModel;

public class Party extends BaseModel {
	/**
	 * 
	 */
	private static final long serialVersionUID = -4966992293271422612L;

	private Long partyId;

	private String partyType;

	private String userLoginId;

	private String partyStatus;

	private Date expiryDate;

	private Date createdTime = new Date();

	private Long createdBy;

	private String remark;

	private UserLogin userLogin;

	private Person person;
	
	private Company company;
	
	private Long roleId;

	private String roleIds;

	private String roleNames;
	
	private String isSystem;

	
	private Long companyId;

	public Party() {

	}

	public Party(Map<String, Object> datas) {

	}

	public Long getPartyId() {
		return partyId;
	}

	public void setPartyId(Long partyId) {
		this.partyId = partyId;
	}

	public String getPartyType() {
		return partyType;
	}

	public void setPartyType(String partyType) {
		this.partyType = partyType;
	}

	public String getUserLoginId() {
		return userLoginId;
	}

	public void setUserLoginId(String userLoginId) {
		this.userLoginId = userLoginId;
	}

	public String getPartyStatus() {
		return partyStatus;
	}

	public void setPartyStatus(String partyStatus) {
		this.partyStatus = partyStatus;
	}


	public Date getExpiryDate() {
		return expiryDate;
	}

	public void setExpiryDate(Date expiryDate) {
		this.expiryDate = expiryDate;
	}

	public Date getCreatedTime() {
		return createdTime;
	}

	public void setCreatedTime(Date createdTime) {
		this.createdTime = createdTime;
	}


	public UserLogin getUserLogin() {
		return userLogin;
	}

	public void setUserLogin(UserLogin userLogin) {
		this.userLogin = userLogin;
	}

	public Person getPerson() {
		return person;
	}

	public void setPerson(Person person) {
		this.person = person;
	}


	public Long getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(Long createdBy) {
		this.createdBy = createdBy;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}


	/**
	 * @return Returns the roleIds
	 */
	public String getRoleIds() {
		return roleIds;
	}

	/**
	 * @param roleIds
	 *            The roleIds to set.
	 */
	public void setRoleIds(String roleIds) {
		this.roleIds = roleIds;
	}

	/**
	 * @return Returns the roleNames
	 */
	public String getRoleNames() {
		return roleNames;
	}

	/**
	 * @param roleNames
	 *            The roleNames to set.
	 */
	public void setRoleNames(String roleNames) {
		this.roleNames = roleNames;
	}
	
	

	public Long getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Long companyId) {
		this.companyId = companyId;
	}

	public Long getRoleId() {
		return roleId;
	}

	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}
	
	

	public Company getCompany() {
		return company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	public String getIsSystem() {
		return isSystem;
	}

	public void setIsSystem(String isSystem) {
		this.isSystem = isSystem;
	}

	public boolean nonExpired() {

		Date expiryDate = getExpiryDate();
		if (expiryDate == null) {
			return true;
		}

		if (new Date().before(expiryDate)) {
			return true;
		}

		return false;
	}


}